import cv2

img = cv2.imread('backGround.jpg')
template = cv2.imread('template.jpg')
height, width, c = template.shape
results = cv2.matchTemplate(img, template, cv2.TM_SQDIFF_NORMED)
minValue, maxValue, minLoc, maxLoc = cv2.minMaxLoc(results)

resultPoint1 = minLoc

resultPoint2 = (resultPoint1[0] + width, resultPoint1[1] + height)

cv2.rectangle(img, resultPoint1, resultPoint2, (0, 0, 255), 2)

cv2.imshow('img', img)
cv2.waitKey()
cv2.destroyAllWindows()
